home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 March / Pc Users extra 6.iso / pshare95 / prog / formula1 / vcform1.z / Sorting.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-10  |  8.6 KB  |  288 lines

  1. VERSION 5.00
  2. Begin VB.Form Sorting 
  3.    Caption         =   "Report Wizard"
  4.    ClientHeight    =   4665
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   6465
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   4665
  10.    ScaleWidth      =   6465
  11.    StartUpPosition =   2  'CenterScreen
  12.    Begin VB.CommandButton btnAscending 
  13.       Height          =   300
  14.       Left            =   5430
  15.       Picture         =   "Sorting.frx":0000
  16.       Style           =   1  'Graphical
  17.       TabIndex        =   20
  18.       Top             =   90
  19.       Visible         =   0   'False
  20.       Width           =   330
  21.    End
  22.    Begin VB.CommandButton btnDescending 
  23.       Height          =   300
  24.       Left            =   5895
  25.       Picture         =   "Sorting.frx":03D2
  26.       Style           =   1  'Graphical
  27.       TabIndex        =   19
  28.       Top             =   90
  29.       Visible         =   0   'False
  30.       Width           =   330
  31.    End
  32.    Begin VB.CommandButton btn4Sort 
  33.       Enabled         =   0   'False
  34.       Height          =   315
  35.       Left            =   5820
  36.       Picture         =   "Sorting.frx":0744
  37.       Style           =   1  'Graphical
  38.       TabIndex        =   18
  39.       Tag             =   "A"
  40.       Top             =   2835
  41.       Width           =   330
  42.    End
  43.    Begin VB.CommandButton btn3Sort 
  44.       Enabled         =   0   'False
  45.       Height          =   315
  46.       Left            =   5820
  47.       Picture         =   "Sorting.frx":0B16
  48.       Style           =   1  'Graphical
  49.       TabIndex        =   17
  50.       Tag             =   "A"
  51.       Top             =   2280
  52.       Width           =   330
  53.    End
  54.    Begin VB.CommandButton btn2Sort 
  55.       Enabled         =   0   'False
  56.       Height          =   315
  57.       Left            =   5820
  58.       Picture         =   "Sorting.frx":0EE8
  59.       Style           =   1  'Graphical
  60.       TabIndex        =   16
  61.       Tag             =   "A"
  62.       Top             =   1755
  63.       Width           =   330
  64.    End
  65.    Begin VB.CommandButton btn1Sort 
  66.       Height          =   315
  67.       Left            =   5820
  68.       Picture         =   "Sorting.frx":12BA
  69.       Style           =   1  'Graphical
  70.       TabIndex        =   15
  71.       Tag             =   "A"
  72.       Top             =   1170
  73.       Width           =   330
  74.    End
  75.    Begin VB.ComboBox cbo4SortFields 
  76.       Enabled         =   0   'False
  77.       Height          =   315
  78.       Left            =   3540
  79.       TabIndex        =   9
  80.       Top             =   2835
  81.       Width           =   2175
  82.    End
  83.    Begin VB.ComboBox cbo3SortFields 
  84.       Enabled         =   0   'False
  85.       Height          =   315
  86.       Left            =   3525
  87.       TabIndex        =   8
  88.       Top             =   2285
  89.       Width           =   2175
  90.    End
  91.    Begin VB.ComboBox cbo2SortFields 
  92.       Enabled         =   0   'False
  93.       Height          =   315
  94.       Left            =   3510
  95.       TabIndex        =   7
  96.       Top             =   1735
  97.       Width           =   2175
  98.    End
  99.    Begin VB.ComboBox cbo1SortFields 
  100.       Height          =   315
  101.       Left            =   3510
  102.       TabIndex        =   6
  103.       Top             =   1185
  104.       Width           =   2175
  105.    End
  106.    Begin VB.Frame Frame1 
  107.       Height          =   3270
  108.       Left            =   90
  109.       TabIndex        =   5
  110.       Top             =   585
  111.       Width           =   2730
  112.       Begin VB.PictureBox Picture1 
  113.          BorderStyle     =   0  'None
  114.          Height          =   2925
  115.          Left            =   240
  116.          Picture         =   "Sorting.frx":168C
  117.          ScaleHeight     =   2925
  118.          ScaleWidth      =   2235
  119.          TabIndex        =   21
  120.          Top             =   210
  121.          Width           =   2235
  122.       End
  123.    End
  124.    Begin VB.CommandButton btnFinish 
  125.       Caption         =   "&Finish"
  126.       Height          =   375
  127.       Left            =   5160
  128.       TabIndex        =   3
  129.       Top             =   4200
  130.       Width           =   975
  131.    End
  132.    Begin VB.CommandButton btnNext 
  133.       Caption         =   "&Next >"
  134.       Height          =   375
  135.       Left            =   3975
  136.       TabIndex        =   2
  137.       Top             =   4200
  138.       Width           =   975
  139.    End
  140.    Begin VB.CommandButton btnBack 
  141.       Caption         =   "< &Back"
  142.       Height          =   375
  143.       Left            =   2985
  144.       TabIndex        =   1
  145.       Top             =   4200
  146.       Width           =   975
  147.    End
  148.    Begin VB.CommandButton btnCancel 
  149.       Cancel          =   -1  'True
  150.       Caption         =   "Cancel"
  151.       Height          =   375
  152.       Left            =   1800
  153.       TabIndex        =   0
  154.       Top             =   4200
  155.       Width           =   975
  156.    End
  157.    Begin VB.Label Label6 
  158.       Caption         =   "You can sort records by up to four fields, in either ascending or descending order."
  159.       Height          =   450
  160.       Left            =   3165
  161.       TabIndex        =   14
  162.       Top             =   630
  163.       Width           =   3090
  164.    End
  165.    Begin VB.Label Label5 
  166.       Caption         =   "4"
  167.       Height          =   225
  168.       Left            =   3210
  169.       TabIndex        =   13
  170.       Top             =   2940
  171.       Width           =   225
  172.    End
  173.    Begin VB.Label Label4 
  174.       Caption         =   "3"
  175.       Height          =   225
  176.       Left            =   3210
  177.       TabIndex        =   12
  178.       Top             =   2370
  179.       Width           =   225
  180.    End
  181.    Begin VB.Label Label3 
  182.       Caption         =   "2"
  183.       Height          =   225
  184.       Left            =   3210
  185.       TabIndex        =   11
  186.       Top             =   1830
  187.       Width           =   225
  188.    End
  189.    Begin VB.Label Label2 
  190.       Caption         =   "1"
  191.       Height          =   225
  192.       Left            =   3210
  193.       TabIndex        =   10
  194.       Top             =   1290
  195.       Width           =   225
  196.    End
  197.    Begin VB.Label Label1 
  198.       Caption         =   "What sort order do you want for detail records?"
  199.       Height          =   285
  200.       Left            =   165
  201.       TabIndex        =   4
  202.       Top             =   195
  203.       Width           =   3630
  204.    End
  205.    Begin VB.Line Line3 
  206.       BorderColor     =   &H80000003&
  207.       X1              =   105
  208.       X2              =   6345
  209.       Y1              =   3960
  210.       Y2              =   3960
  211.    End
  212.    Begin VB.Line Line4 
  213.       BorderColor     =   &H80000005&
  214.       X1              =   105
  215.       X2              =   6345
  216.       Y1              =   3975
  217.       Y2              =   3975
  218.    End
  219. Attribute VB_Name = "Sorting"
  220. Attribute VB_GlobalNameSpace = False
  221. Attribute VB_Creatable = False
  222. Attribute VB_PredeclaredId = True
  223. Attribute VB_Exposed = False
  224. Option Explicit
  225. Private Sub btn1Sort_Click()
  226.     If btn1Sort.Tag = "A" Then
  227.         btn1Sort.Tag = "D"
  228.         btn1Sort.Picture = btnDescending.Picture
  229.     Else
  230.         btn1Sort.Tag = "A"
  231.         btn1Sort.Picture = btnAscending.Picture
  232.     End If
  233. End Sub
  234. Private Sub btn2Sort_Click()
  235.     If btn2Sort.Tag = "A" Then
  236.         btn2Sort.Tag = "D"
  237.         btn2Sort.Picture = btnDescending.Picture
  238.     Else
  239.         btn2Sort.Tag = "A"
  240.         btn2Sort.Picture = btnAscending.Picture
  241.     End If
  242. End Sub
  243. Private Sub btn3Sort_Click()
  244.     If btn3Sort.Tag = "A" Then
  245.         btn3Sort.Tag = "D"
  246.         btn3Sort.Picture = btnDescending.Picture
  247.     Else
  248.         btn3Sort.Tag = "A"
  249.         btn3Sort.Picture = btnAscending.Picture
  250.     End If
  251. End Sub
  252. Private Sub btn4Sort_Click()
  253.     If btn4Sort.Tag = "A" Then
  254.         btn4Sort.Tag = "D"
  255.         btn4Sort.Picture = btnDescending.Picture
  256.     Else
  257.         btn4Sort.Tag = "A"
  258.         btn4Sort.Picture = btnAscending.Picture
  259.     End If
  260. End Sub
  261. Private Sub btnNext_Click()
  262.     Sorting.Hide
  263. '    Call PopulateSheet
  264.     Call PopulateReportWizard
  265. End Sub
  266. Private Sub cbo1SortFields_Click()
  267.     cbo2SortFields.Enabled = True
  268.     btn2Sort.Enabled = True
  269. End Sub
  270. Private Sub cbo2SortFields_Click()
  271.     cbo3SortFields.Enabled = True
  272.     btn2Sort.Enabled = True
  273. End Sub
  274. Private Sub cbo3SortFields_Click()
  275.     cbo4SortFields.Enabled = True
  276.     btn2Sort.Enabled = True
  277. End Sub
  278. Private Sub Form_Load()
  279.     Dim NumFields As Integer
  280.     For NumFields = 0 To Grouping.lstFields.ListCount - 1
  281.         Grouping.lstFields.ListIndex = NumFields
  282.         cbo1SortFields.AddItem Grouping.lstFields.Text
  283.         cbo2SortFields.AddItem Grouping.lstFields.Text
  284.         cbo3SortFields.AddItem Grouping.lstFields.Text
  285.         cbo4SortFields.AddItem Grouping.lstFields.Text
  286.     Next NumFields
  287. End Sub
  288.